import api from './index'

//注册
export const register = (user) => {
  return api.post('user', user, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

//登录
export const login = (user) => {
  return api.post('user/session', user, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
